package com.example.rabbitmq.sender;

import com.example.rabbitmq.common.bean.UserEntity;
import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class Sender {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void send(UserEntity userEntity) {
        this.rabbitTemplate.convertAndSend("storeScore", userEntity);
    }
}
